<?php

include 'lib/ofc/php-ofc-library/open-flash-chart.php';
include("recordmanager.php");
$animation_1= 'pop-up';
$delay_1    = 0;
$cascade_1    = 1;
$title = new title( "月度纪录" );

$result=getCostByMonth();
$line_dot = new line();
$line_dot->set_values( array_values($result));
$line_dot->set_on_show(new line_on_show($animation_1, $cascade_1, $delay_1));

$x = new x_axis();
$x->set_labels_from_array(array_keys($result));

$y= new y_axis();
$y->set_range(0, 1000);

$chart = new open_flash_chart();
$chart->set_title( $title );
$chart->add_element( $line_dot );
$chart->set_x_axis( $x );
$chart->set_y_axis($y);

echo $chart->toPrettyString();
?>